'''
Created on 22/09/2012

@author: Christian
'''

from mercurial import ui, hg

if __name__ == '__main__':
   
    u = ui.ui()  # get a ui object
    repo = hg.repository(u, "I:\Repositories\hg\Python") # get a repo object for the current directory
    
    changes = repo.changelog

    for change in changes:
        ctx = repo.changectx(change)
       
        print ctx.rev() 
#        print ctx.description()
#        print ctx.rev()         # the revision number
#        print ctx.node()        # the revision ID (as 20 bytes in an array)
#        print ctx.hex()         # the revision ID (as 40 characters suitable for printing)
#        print ctx.user()        # the user who created the changeset
#        print ctx.date()        # the date of the changeset
#        print ctx.files()       # the files changed in the changeset
#        print ctx.description() # the changeset log message
#        print ctx.branch()      # the branch of the changeset
#        print ctx.tags()        # a list of the tags applied to the changeset
#        print ctx.parents()     # a list of the change context objects for the changeset's parents
#        print ctx.children()    # a list of the change context objects for the changeset's children
        
        # The value returnes are: modified, added, removed, deleted, unknown, ignored, clean
        for files in  repo.status(ctx):
            print files 
            

        
